<?php

class PathHelper {
	public static function getPublicPath($fullPath){
		# WHO WROTE THIS JUNK
		// shis ir db:
		sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url'));
//		return public_path(trim(str_replace(sfConfig::get('sf_web_dir'), '', $fullPath), "/"));
#		return public_path(str_replace(substr(sfConfig::get('sf_root_dir'), 0, strrpos(sfConfig::get('sf_root_dir'), "/")), '', $fullPath));
		return "/".trim(str_replace(sfConfig::get("sf_web_dir"), "", $fullPath), "/");
	}
}

